<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class ModifyAdminUserTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('admin_menu', function (Blueprint $table) {
            $table->string('name',60)->unique()->default('')->comment('唯一标识')->change();
            $table->string('title',60)->default('')->comment('菜单名称')->after('name');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('admin_menu', function (Blueprint $table) {
            $table->dropColumn('title');
        });
    }
}
